Optimal. Leaf size=158 \[ \frac {(c+d x)^{3/2}}{3 d}-\frac {\sqrt {d} \sqrt {\pi } \cos \left (2 a-\frac {2 b c}{d}\right ) S\left (\frac {2 \sqrt {b} \sqrt {c+d x}}{\sqrt {d} \sqrt {\pi }}\right )}{8 b^{3/2}}-\frac {\sqrt {d} \sqrt {\pi } \text {FresnelC}\left (\frac {2 \sqrt {b} \sqrt {c+d x}}{\sqrt {d} \sqrt {\pi }}\right ) \sin \left (2 a-\frac {2 b c}{d}\right )}{8 b^{3/2}}+\frac {\sqrt {c+d x} \sin (2 a+2 b x)}{4 b} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.18, antiderivative size = 158, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 7, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.389, Rules used = {3393, 3377,
3387, 3386, 3432, 3385, 3433} \begin {gather*} -\frac {\sqrt {\pi } \sqrt {d} \sin \left (2 a-\frac {2 b c}{d}\right ) \text {FresnelC}\left (\frac {2 \sqrt {b} \sqrt {c+d x}}{\sqrt {\pi } \sqrt {d}}\right )}{8 b^{3/2}}-\frac {\sqrt {\pi } \sqrt {d} \cos \left (2 a-\frac {2 b c}{d}\right ) S\left (\frac {2 \sqrt {b} \sqrt {c+d x}}{\sqrt {d} \sqrt {\pi }}\right )}{8 b^{3/2}}+\frac {\sqrt {c+d x} \sin (2 a+2 b x)}{4 b}+\frac {(c+d x)^{3/2}}{3 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3377
Rule 3385
Rule 3386
Rule 3387
Rule 3393
Rule 3432
Rule 3433
Rubi steps
\begin {align*} \int \sqrt {c+d x} \cos ^2(a+b x) \, dx &=\int \left (\frac {1}{2} \sqrt {c+d x}+\frac {1}{2} \sqrt {c+d x} \cos (2 a+2 b x)\right ) \, dx\\ &=\frac {(c+d x)^{3/2}}{3 d}+\frac {1}{2} \int \sqrt {c+d x} \cos (2 a+2 b x) \, dx\\ &=\frac {(c+d x)^{3/2}}{3 d}+\frac {\sqrt {c+d x} \sin (2 a+2 b x)}{4 b}-\frac {d \int \frac {\sin (2 a+2 b x)}{\sqrt {c+d x}} \, dx}{8 b}\\ &=\frac {(c+d x)^{3/2}}{3 d}+\frac {\sqrt {c+d x} \sin (2 a+2 b x)}{4 b}-\frac {\left (d \cos \left (2 a-\frac {2 b c}{d}\right )\right ) \int \frac {\sin \left (\frac {2 b c}{d}+2 b x\right )}{\sqrt {c+d x}} \, dx}{8 b}-\frac {\left (d \sin \left (2 a-\frac {2 b c}{d}\right )\right ) \int \frac {\cos \left (\frac {2 b c}{d}+2 b x\right )}{\sqrt {c+d x}} \, dx}{8 b}\\ &=\frac {(c+d x)^{3/2}}{3 d}+\frac {\sqrt {c+d x} \sin (2 a+2 b x)}{4 b}-\frac {\cos \left (2 a-\frac {2 b c}{d}\right ) \text {Subst}\left (\int \sin \left (\frac {2 b x^2}{d}\right ) \, dx,x,\sqrt {c+d x}\right )}{4 b}-\frac {\sin \left (2 a-\frac {2 b c}{d}\right ) \text {Subst}\left (\int \cos \left (\frac {2 b x^2}{d}\right ) \, dx,x,\sqrt {c+d x}\right )}{4 b}\\ &=\frac {(c+d x)^{3/2}}{3 d}-\frac {\sqrt {d} \sqrt {\pi } \cos \left (2 a-\frac {2 b c}{d}\right ) S\left (\frac {2 \sqrt {b} \sqrt {c+d x}}{\sqrt {d} \sqrt {\pi }}\right )}{8 b^{3/2}}-\frac {\sqrt {d} \sqrt {\pi } C\left (\frac {2 \sqrt {b} \sqrt {c+d x}}{\sqrt {d} \sqrt {\pi }}\right ) \sin \left (2 a-\frac {2 b c}{d}\right )}{8 b^{3/2}}+\frac {\sqrt {c+d x} \sin (2 a+2 b x)}{4 b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 0.35, size = 146, normalized size = 0.92 \begin {gather*} \frac {1}{48} \sqrt {c+d x} \left (\frac {16 (c+d x)}{d}-\frac {3 i \sqrt {2} e^{2 i \left (a-\frac {b c}{d}\right )} \text {Gamma}\left (\frac {3}{2},-\frac {2 i b (c+d x)}{d}\right )}{b \sqrt {-\frac {i b (c+d x)}{d}}}+\frac {3 i \sqrt {2} e^{-2 i \left (a-\frac {b c}{d}\right )} \text {Gamma}\left (\frac {3}{2},\frac {2 i b (c+d x)}{d}\right )}{b \sqrt {\frac {i b (c+d x)}{d}}}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.06, size = 150, normalized size = 0.95
method | result | size |
derivativedivides | \(\frac {\frac {\left (d x +c \right )^{\frac {3}{2}}}{3}+\frac {d \sqrt {d x +c}\, \sin \left (\frac {2 b \left (d x +c \right )}{d}+\frac {2 d a -2 b c}{d}\right )}{4 b}-\frac {d \sqrt {\pi }\, \left (\cos \left (\frac {2 d a -2 b c}{d}\right ) \mathrm {S}\left (\frac {2 b \sqrt {d x +c}}{\sqrt {\pi }\, \sqrt {\frac {b}{d}}\, d}\right )+\sin \left (\frac {2 d a -2 b c}{d}\right ) \FresnelC \left (\frac {2 b \sqrt {d x +c}}{\sqrt {\pi }\, \sqrt {\frac {b}{d}}\, d}\right )\right )}{8 b \sqrt {\frac {b}{d}}}}{d}\) | \(150\) |
default | \(\frac {\frac {\left (d x +c \right )^{\frac {3}{2}}}{3}+\frac {d \sqrt {d x +c}\, \sin \left (\frac {2 b \left (d x +c \right )}{d}+\frac {2 d a -2 b c}{d}\right )}{4 b}-\frac {d \sqrt {\pi }\, \left (\cos \left (\frac {2 d a -2 b c}{d}\right ) \mathrm {S}\left (\frac {2 b \sqrt {d x +c}}{\sqrt {\pi }\, \sqrt {\frac {b}{d}}\, d}\right )+\sin \left (\frac {2 d a -2 b c}{d}\right ) \FresnelC \left (\frac {2 b \sqrt {d x +c}}{\sqrt {\pi }\, \sqrt {\frac {b}{d}}\, d}\right )\right )}{8 b \sqrt {\frac {b}{d}}}}{d}\) | \(150\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [C] Result contains complex when optimal does not.
time = 0.53, size = 229, normalized size = 1.45 \begin {gather*} \frac {\sqrt {2} {\left (\frac {32 \, \sqrt {2} {\left (d x + c\right )}^{\frac {3}{2}} b^{2}}{d} + 24 \, \sqrt {2} \sqrt {d x + c} b \sin \left (\frac {2 \, {\left ({\left (d x + c\right )} b - b c + a d\right )}}{d}\right ) - 3 \, {\left (\left (i + 1\right ) \cdot 4^{\frac {1}{4}} \sqrt {\pi } d \left (\frac {b^{2}}{d^{2}}\right )^{\frac {1}{4}} \cos \left (-\frac {2 \, {\left (b c - a d\right )}}{d}\right ) - \left (i - 1\right ) \cdot 4^{\frac {1}{4}} \sqrt {\pi } d \left (\frac {b^{2}}{d^{2}}\right )^{\frac {1}{4}} \sin \left (-\frac {2 \, {\left (b c - a d\right )}}{d}\right )\right )} \operatorname {erf}\left (\sqrt {d x + c} \sqrt {\frac {2 i \, b}{d}}\right ) - 3 \, {\left (-\left (i - 1\right ) \cdot 4^{\frac {1}{4}} \sqrt {\pi } d \left (\frac {b^{2}}{d^{2}}\right )^{\frac {1}{4}} \cos \left (-\frac {2 \, {\left (b c - a d\right )}}{d}\right ) + \left (i + 1\right ) \cdot 4^{\frac {1}{4}} \sqrt {\pi } d \left (\frac {b^{2}}{d^{2}}\right )^{\frac {1}{4}} \sin \left (-\frac {2 \, {\left (b c - a d\right )}}{d}\right )\right )} \operatorname {erf}\left (\sqrt {d x + c} \sqrt {-\frac {2 i \, b}{d}}\right )\right )}}{192 \, b^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.44, size = 148, normalized size = 0.94 \begin {gather*} -\frac {3 \, \pi d^{2} \sqrt {\frac {b}{\pi d}} \cos \left (-\frac {2 \, {\left (b c - a d\right )}}{d}\right ) \operatorname {S}\left (2 \, \sqrt {d x + c} \sqrt {\frac {b}{\pi d}}\right ) + 3 \, \pi d^{2} \sqrt {\frac {b}{\pi d}} \operatorname {C}\left (2 \, \sqrt {d x + c} \sqrt {\frac {b}{\pi d}}\right ) \sin \left (-\frac {2 \, {\left (b c - a d\right )}}{d}\right ) - 4 \, {\left (2 \, b^{2} d x + 3 \, b d \cos \left (b x + a\right ) \sin \left (b x + a\right ) + 2 \, b^{2} c\right )} \sqrt {d x + c}}{24 \, b^{2} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {c + d x} \cos ^{2}{\left (a + b x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [C] Result contains complex when optimal does not.
time = 0.52, size = 434, normalized size = 2.75 \begin {gather*} -\frac {12 \, {\left (\frac {\sqrt {\pi } d \operatorname {erf}\left (-\frac {\sqrt {b d} \sqrt {d x + c} {\left (-\frac {i \, b d}{\sqrt {b^{2} d^{2}}} + 1\right )}}{d}\right ) e^{\left (-\frac {2 \, {\left (i \, b c - i \, a d\right )}}{d}\right )}}{\sqrt {b d} {\left (-\frac {i \, b d}{\sqrt {b^{2} d^{2}}} + 1\right )}} + \frac {\sqrt {\pi } d \operatorname {erf}\left (-\frac {\sqrt {b d} \sqrt {d x + c} {\left (\frac {i \, b d}{\sqrt {b^{2} d^{2}}} + 1\right )}}{d}\right ) e^{\left (-\frac {2 \, {\left (-i \, b c + i \, a d\right )}}{d}\right )}}{\sqrt {b d} {\left (\frac {i \, b d}{\sqrt {b^{2} d^{2}}} + 1\right )}} - 4 \, \sqrt {d x + c}\right )} c - \frac {3 \, \sqrt {\pi } {\left (4 \, b c - i \, d\right )} d \operatorname {erf}\left (-\frac {\sqrt {b d} \sqrt {d x + c} {\left (-\frac {i \, b d}{\sqrt {b^{2} d^{2}}} + 1\right )}}{d}\right ) e^{\left (-\frac {2 \, {\left (i \, b c - i \, a d\right )}}{d}\right )}}{\sqrt {b d} {\left (-\frac {i \, b d}{\sqrt {b^{2} d^{2}}} + 1\right )} b} - \frac {3 \, \sqrt {\pi } {\left (4 \, b c + i \, d\right )} d \operatorname {erf}\left (-\frac {\sqrt {b d} \sqrt {d x + c} {\left (\frac {i \, b d}{\sqrt {b^{2} d^{2}}} + 1\right )}}{d}\right ) e^{\left (-\frac {2 \, {\left (-i \, b c + i \, a d\right )}}{d}\right )}}{\sqrt {b d} {\left (\frac {i \, b d}{\sqrt {b^{2} d^{2}}} + 1\right )} b} - 16 \, {\left (d x + c\right )}^{\frac {3}{2}} + 48 \, \sqrt {d x + c} c - \frac {6 i \, \sqrt {d x + c} d e^{\left (-\frac {2 \, {\left (i \, {\left (d x + c\right )} b - i \, b c + i \, a d\right )}}{d}\right )}}{b} + \frac {6 i \, \sqrt {d x + c} d e^{\left (-\frac {2 \, {\left (-i \, {\left (d x + c\right )} b + i \, b c - i \, a d\right )}}{d}\right )}}{b}}{48 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\cos \left (a+b\,x\right )}^2\,\sqrt {c+d\,x} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________